<property name="use-header-bar">1</property>
<property name="title" translatable="yes">Zelda</property>
<property name="hide-on-close">1</property>
- <child internal-child="vbox">
+ <child internal-child="content_area">
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="use-header-bar">1</property>
<property name="title" translatable="yes">Settings</property>
<property name="hide-on-close">1</property>
- <child internal-child="vbox">
+ <child internal-child="content_area">
<object class="GtkBox">
<child>
<object class="GtkGrid">
<property name="use-header-bar">1</property>
<property name="title" translatable="yes">Choose one</property>
<property name="hide-on-close">1</property>
- <child internal-child="vbox">
+ <child internal-child="content_area">
<object class="GtkBox">
<child>
<object class="GtkFlowBox" id="selection_flowbox">
* # GtkDialog as GtkBuildable
*
* The GtkDialog implementation of the #GtkBuildable interface exposes the
- * @vbox and @action_area as internal children with the names “vbox” and
- * “action_area”.
+ * @message_area and @action_area as internal children with the names
+ * “action_area” and “action_area”.
*
* GtkDialog supports a custom <action-widgets> element, which can contain
* multiple <action-widget> elements. The “response” attribute specifies a
typedef struct
{
- GtkWidget *vbox;
GtkWidget *headerbar;
GtkWidget *action_area;
+ GtkWidget *content_area;
GtkWidget *action_box;
GtkSizeGroup *size_group;
/* Bind class to template
*/
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/ui/gtkdialog.ui");
- gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, vbox);
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, headerbar);
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, action_area);
+ gtk_widget_class_bind_template_child_internal_private (widget_class, GtkDialog, content_area);
gtk_widget_class_bind_template_child_private (widget_class, GtkDialog, action_box);
gtk_widget_class_set_css_name (widget_class, I_("dialog"));
* Creates a new dialog box.
*
* Widgets should not be packed into this #GtkWindow
- * directly, but into the @vbox and @action_area, as described above.
+ * directly, but into the @content_area and @action_area, as described above.
*
* Returns: the new dialog as a #GtkWidget
*/
g_return_val_if_fail (GTK_IS_DIALOG (dialog), NULL);
- return priv->vbox;
+ return priv->content_area;
}
</child>
</object>
</child>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox1">
+ <child internal-child="content_area">
+ <object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<property name="margin">5</property>
<template class="GtkAppChooserDialog" parent="GtkDialog">
<property name="title" translatable="yes">Select Application</property>
<property name="type-hint">dialog</property>
- <child internal-child="vbox">
+ <child internal-child="content_area">
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<property name="title" translatable="yes">Select a Color</property>
<property name="type-hint">dialog</property>
<property name="resizable">0</property>
- <child internal-child="vbox">
+ <child internal-child="content_area">
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
</object>
</child>
<child>
- <object class="GtkBox" id="vbox">
+ <object class="GtkBox">
<property name="orientation">vertical</property>
<style>
<class name="dialog-vbox"/>
</style>
+
+ <!-- This is empty here and just exists so we can expose it as
+ GtkDialog API. -->
+ <child>
+ <object class="GtkBox" id="content_area">
+ </object>
+ </child>
+
<child>
<object class="GtkBox" id="action_box">
<style>
<property name="type-hint">dialog</property>
<property name="default-width">600</property>
<signal name="response" handler="response_cb" swapped="no"/>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox1">
+ <child internal-child="content_area">
+ <object class="GtkBox">
<property name="orientation">vertical</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<template class="GtkFontChooserDialog" parent="GtkDialog">
<property name="title" translatable="yes">Select Font</property>
<property name="type-hint">dialog</property>
- <child internal-child="vbox">
+ <child internal-child="content_area">
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="headerbar">
<object class="GtkHeaderBar" id="headerbar1"/>
</child>
- <child internal-child="vbox">
+ <child internal-child="content_area">
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
<property name="spacing">20</property>
<property name="resizable">0</property>
<property name="type-hint">dialog</property>
<property name="title" translatable="yes">Page Setup</property>
- <child internal-child="vbox">
+ <child internal-child="content_area">
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<property name="type-hint">dialog</property>
<signal name="notify::page-setup" handler="redraw_page_layout_preview" swapped="no"/>
<signal name="response" handler="error_dialogs" swapped="no"/>
- <child internal-child="vbox">
+ <child internal-child="content_area">
<object class="GtkBox" id="dialog-vbox1">
<property name="orientation">vertical</property>
<property name="spacing">2</property>
"<interface>"
" <object class=\"GtkDialog\" id=\"dialog1\">"
" <property name=\"use_header_bar\">1</property>"
- " <child internal-child=\"vbox\">"
+ " <child internal-child=\"content_area\">"
" <object class=\"GtkBox\" id=\"dialog1-vbox\">"
" <property name=\"orientation\">vertical</property>"
" <child internal-child=\"action_area\">"
g_assert (vbox != NULL);
g_assert (GTK_IS_BOX (vbox));
g_assert (gtk_orientable_get_orientation (GTK_ORIENTABLE (vbox)) == GTK_ORIENTATION_VERTICAL);
- g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (gtk_widget_get_parent (GTK_WIDGET (vbox)))), "dialog1") == 0);
g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (content_area)), "dialog1-vbox") == 0);
action_area = gtk_builder_get_object (builder, "dialog1-action_area");
const gchar buffer1[] =
"<interface>"
" <object class=\"GtkDialog\" id=\"dialog1\">"
- " <child internal-child=\"vbox\">"
+ " <child internal-child=\"content_area\">"
" <object class=\"GtkBox\" id=\"dialog1-vbox\">"
" <property name=\"orientation\">vertical</property>"
" <child internal-child=\"action_area\">"